<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <p>您最喜欢的游戏是:{{msg}}</p>
        <button @click="click1('我的世界')">我的世界</button>
        <button @click="click1('勇者斗恶龙')">勇者斗恶龙</button>
        <button @click="click1('冯三胖')">冯三胖</button>
       


    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg:'我的世界',
            },
            methods: {
                click1(abc){
                    this.msg =abc;
                }
            }
        })
    </script>
</body>

</html>
